#include <iostream>

template<typename T, size_t n>
class Factorial
{
public:
	static T value() {
		return n * Factorial<T, n-1>::value();
	}
	void f() {
		for(int i=0; i<n; i++) {
			char c;
			c = 't';
			std::cout << "hi" << c << std::endl;
		};
	}
};

template<typename T>
class Factorial<T, 0>
{
public:
	static T value() {
		return 1;
	}
};

int main(int argc, char *argv[])
{
	Factorial<int, 50> f;
	std::cout << f.value() << std::endl;	
	f.f();
	return 0;
}